/* 
=====================
    Navigation Bar
=====================
*/

.header-container {
  padding-top: 10px;
  padding-right: 16px;
  padding-left: 48px;
  background: $body-color;
  z-index: 1030;
}

.navbar {
  padding: 0;
  background: $white;
  border-bottom: 0.01rem solid $m-color_1;
  border-radius: 6px;
  -webkit-box-shadow: 0 4px 6px 0 rgba(85, 85, 85, 0.08), 0 1px 20px 0 rgba(0, 0, 0, 0.07), 0px 1px 11px 0px rgba(0, 0, 0, 0.07);
  -moz-box-shadow: 0 4px 6px 0 rgba(85, 85, 85, 0.08), 0 1px 20px 0 rgba(0, 0, 0, 0.07), 0px 1px 11px 0px rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 6px 0 rgba(85, 85, 85, 0.08), 0 1px 20px 0 rgba(0, 0, 0, 0.07), 0px 1px 11px 0px rgba(0, 0, 0, 0.07);

  &.expand-header {
    margin: 0;
  }
}

.navbar-brand {
  width: 5.5rem;
  padding-top: 0.0rem;
  padding-bottom: 0.0rem;
  margin-right: 0.0rem;
}

.navbar .border-underline {
  border-left: 1px solid #ccc;
  height: 20px;
  margin-top: 18px;
  margin-left: -5px;
  margin-right: 8px;
}

.navbar-expand-sm .navbar-item {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;

    .nav-link {
      line-height: 2.75rem;
      padding: 6.24px 9.6px;
      text-transform: initial;
      position: unset;
    }
}

.navbar {
  .toggle-sidebar, .sidebarCollapse {
    display: inline-block;
    position: relative;
    float: left;
    color: $dark;
    padding: 8px 0;
    font-size: 23px;
    line-height: 1.9;
    margin-left: 16px;
  }

  .dropdown-menu {
    border-radius: 6px;
    border-color: $m-color_3;
  }

  .dropdown-item {
    line-height: 1.8;
    font-size: 0.96rem;
    padding: 15px 0 15px 0;
    word-wrap: normal;
  }

  .navbar-item .nav-item {
    &.dropdown.show a.nav-link span {
      color: $secondary !important;

      &.badge {
        background-color: $primary !important;
      }
    }

    .dropdown-item {
      &.active, &:active {
        background-color: transparent;
        color: #16181b;
      }
    }

    &.dropdown {
      .nav-link:hover span {
        color: $secondary !important;
      }

      .dropdown-menu {
        top: 95%;
        border-radius: 0;
        border: none;
        border-radius: 6px;
        -webkit-box-shadow: 0 10px 30px 0 rgba(31, 45, 61, 0.1);
        box-shadow: 0 10px 30px 0 rgba(31, 45, 61, 0.1);
        background: $m-color_20;
        
        .dropdown-item {
          border-radius: 0;
        }
      }
    }
  }

  .language-dropdown {
    margin-left: 20px;

    a {
      &.nav-link {
        position: relative;
        font-size: 24px;
        padding: 0;
      }

      &.dropdown-toggle {
        &:after {
          display: none;
        }

        img {
          width: 20px;
          height: 20px;
          margin: 17px 0px;
        }
      }
    }

    .dropdown-menu {
      min-width: 7rem;
      left: 50%;
      transform: translate(-50%, 0);
      box-shadow: none;
      top: 67px !important;
      z-index: 1070;
      border: 1px solid $m-color_3;
      padding: 0px 6px;
      border-radius: 4px;
    }
  }

  .navbar-item .nav-item.language-dropdown .dropdown-menu:after {
    position: absolute;
    content: '';
    top: -10px;
    margin-left: auto;
    margin-right: auto;
    height: 0;
    width: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 15px solid $m-color_20;
    left: 0;
    right: 0;
    border-bottom-color: $m-color_20;
  }

  .language-dropdown .dropdown-menu {
    .dropdown-item {
      &:hover {
        background: transparent !important;
      }

      &.active, &:active {
        background: transparent;
        color: #16181b;
      }
    }

    a {
      img {
        width: 20px;
        height: 20px;
        margin-right: 16px;
      }

      span {
        color: $m-color_9;
        font-weight: 500;
      }
    }

    .dropdown-item:hover span {
      color: $primary !important;
    }
  }

  .navbar-item .nav-item {
    &.dropdown.message-dropdown {
      margin-left: 20px;

      .nav-link {
        font-size: 20px;
        padding: 4.24px 0;

        &:after {
          display: none;
        }

        svg {
          color: $dark;
        }

        span.badge {
          position: absolute;
          top: 13px;
          right: 2px;
          width: 18px;
          height: 18px;
          border-radius: 50%;
          padding: 1px 5px 0px;
          font-size: 10px;
          color: #fff !important;
          background: $primary;
          border: 1px solid $m-color_3;
          top: 10px;
          right: -8px;
        }
      }

      &.double-digit .nav-link span.badge {
        top: 11px;
        right: 1px;
        width: 22px;
        height: 22px;
        padding: 3px 3px 0px;
        font-size: 9px;
      }
    }

    &.message-dropdown .dropdown-menu {
      border: none;
      border-radius: 4px;
      min-width: 21rem;
      right: -4px;
      left: auto;
      top: 67px;
      padding: 24px 24px;

      &:after {
        position: absolute;
        content: '';
        top: -10px;
        margin-left: -7px;
        height: 0;
        width: 0;
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;
        border-bottom: 15px solid $m-color_20;
        left: auto;
        right: 6px;
        border-bottom-color: $m-color_20;
      }

      a.dropdown-item {
        cursor: pointer;

        &:first-child {
          padding-top: 0;
        }

        &:last-child {
          padding-bottom: 0;
        }

        &:not(:last-child) {
          border-bottom: 1px solid $m-color_3;
        }

        &:hover {
          background-color: transparent;
        }
      }

      .dropdown-item {
        &.active, &:active {
          background-color: transparent;
        }
      }

      a.dropdown-item {
        > div .media {
          margin: 0;

          &.notification-new {
            .usr-img, .notification-icon {
              position: relative;
            }
          }

          .usr-profile-img .user-profile {
            position: relative;
            color: $m-color_6;
            display: -webkit-inline-box;
            display: -ms-inline-flexbox;
            display: inline-flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            justify-content: center;
            vertical-align: middle;
            font-size: 14px;
            font-weight: 600;
            height: 3.125rem;
            width: 3.125rem;
            background: rgba(0, 23, 55, 0.08);
            border-radius: 50%;
            border: 2px solid $m-color_6;
          }
        }

        &:hover {
          > div .media .usr-profile-img .user-profile {
            color: $primary;
            background-color: rgba(27, 85, 226, 0.2392156863);
            border: 2px solid $primary;
          }

          > div .media .notification-icon .icon-svg {
            color: $primary;
            fill: rgba(27, 85, 226, 0.2392156863);
          }
        }

        > div .media {
          .media-body p {
            &.meta-user-name, &.meta-title {
              color: $dark;
              font-weight: 600;
              font-size: 14px;
              margin-bottom: 4px;
            }

            &.meta-time {
              color: $primary;
              font-weight: 600;
              font-size: 13px;
            }

            &.message-text {
              color: $m-color_6;
              font-size: 14px;
              white-space: normal;
              line-height: 20px;
              word-break: break-word;
            }
          }

          .notification-icon .icon-svg {
            position: relative;
            color: $white;
            display: -webkit-inline-box;
            display: -ms-inline-flexbox;
            display: inline-flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            justify-content: center;
            vertical-align: middle;
            font-weight: 600;
            height: 3.125rem;
            width: 3.125rem;
            background: rgba(0, 23, 55, 0.08);
            color: $m-color_6;
            border-radius: 12px;
          }
        }
      }
    }

    &.dropdown.notification-dropdown {
      margin-left: 20px;

      .nav-link {
        font-size: 21px;
        padding: 4.24px 0;

        &:after {
          display: none;
        }

        svg {
          color: $dark;
        }

        span.badge {
          position: absolute;
          top: 14px;
          right: 2px;
          width: 9px;
          height: 9px;
          border-radius: 50%;
          padding: 3px 0px 0px;
          font-size: 10px;
          color: #fff !important;
          background: $primary;
          display: block;
          border: 1px solid $m-color_3;
        }
      }
    }

    &.notification-dropdown .dropdown-menu {
      border: none;
      border-radius: 4px;
      padding: 24px 24px;
      right: 0;
      left: auto;
      top: 67px;

      .dropdown-item {
        &.active, &:active {
          background-color: transparent;
        }
      }
    }

    &.dropdown.notification-dropdown .dropdown-menu {
      min-width: 18rem;
      right: -5px;

      &:after {
        position: absolute;
        content: '';
        top: -10px;
        margin-left: -7px;
        height: 0;
        width: 0;
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;
        border-bottom: 15px solid $m-color_20;
        left: auto;
        right: 8px;
        border-bottom-color: $m-color_20;
      }

      .dropdown-item {
        &:hover svg {
          color: $primary;
          fill: rgba(27, 85, 226, 0.2392156863);
        }

        &:focus, &:hover {
          background-color: transparent;
          cursor: pointer;
        }

        &:not(:last-child) {
          border-bottom: 1px solid $m-color_3;
        }

        &:first-child {
          padding-top: 0;
        }

        &:last-child {
          padding-bottom: 0;
        }

        .media {
          margin: 0;
        }

        svg {
          width: 25px;
          height: 30px;
          color: $m-color_6;
          margin-right: 12px;
          fill: rgba(0, 23, 55, 0.08);
        }

        .notification-para {
          color: $m-color_7;
          font-size: 14px;
          font-weight: 600;
          line-height: 1.5;
          white-space: normal;

          .user-name {
            color: $primary;
            font-weight: 700;
          }
        }

        .notification-meta-time {
          font-size: 13px;
          font-weight: 600;
          color: $dark;
        }
      }
    }

    .form-inline.search.input-focused .search-form-control:focus {
      box-shadow: none;
    }

    form.form-inline input.search-form-control {
      &::-webkit-input-placeholder, &::-ms-input-placeholder, &::-moz-placeholder {
        color: $m-color_6;
        letter-spacing: 1px;
      }
    }

    .form-inline.search {
      .search-form-control {
        opacity: 0;
        transition: opacity 200ms, right 200ms;
      }

      &.input-focused {
        .search-form-control {
          opacity: 1;
          transition: opacity 200ms, right 200ms;
        }

        position: absolute;
        bottom: 0;
        top: 0;
        background: $m-color_20;
        height: 100%;
        width: 100%;
        left: 0;
        right: 0;
        z-index: 32;
        margin-top: 0px !important;
        display: flex;
        opacity: 1;
        transition: opacity 200ms, right 200ms;
      }

      opacity: 0;
      transition: opacity 200ms, right 200ms;
      right: -25px;
      border-radius: 6px;
    }

    &.search-animated {
      position: initial;

      svg {
        font-weight: 600;
        cursor: pointer;
        color: $dark;
        position: initial;
        width: 24px;
        height: 24px;
        transition: left 200ms;
        left: 1453px;
      }

      &.show-search svg {
        margin: 0;
        position: absolute;
        top: 18px;
        left: 12px;
        width: 22px;
        height: 22px;
        color: $dark;
        z-index: 40;
        transition: left 100ms;
      }
    }

    .form-inline.search {
      &.input-focused {
        .search-bar {
          width: 100%;
        }

        .search-form-control {
          background: transparent;
          display: block;
          padding-left: 50px;
          padding-right: 12px;
          border: none;
        }
      }

      .search-form-control {
        border: none;
        width: 100%;
        display: none;
      }
    }
  }
}

/*   Language   */

/*   Language Dropdown  */

/*Message Dropdown*/

/*Notification Dropdown*/

/* Search */

.search-overlay {
  display: none;
  position: fixed;
  width: 100vw;
  height: 100vh;
  background: transparent !important;
  z-index: 814 !important;
  opacity: 0;
  transition: all 0.5s ease-in-out;

  &.show {
    display: block;
    opacity: .1;
  }
}

/* User Profile Dropdown*/

.navbar .navbar-item .nav-item {
  &.user-profile-dropdown {
    margin-left: 20px;
    margin-right: 16px;

    .nav-link.user {
      padding: 4.64px 0;
      font-size: 25px;
    }
  }

  &.dropdown.user-profile-dropdown .nav-link:after {
    display: none;
  }

  &.user-profile-dropdown {
    .nav-link svg {
      color: $dark;
    }

    .dropdown-menu {
      right: 8px;
      left: auto;
      min-width: 12rem;
      right: -16px;
      left: auto;
      min-width: 14rem;
      border-top-left-radius: 4px;
      border-top-right-radius: 4px;
      top: 67px;
      padding: 15px;

      &:after {
        position: absolute;
        content: '';
        top: -10px;
        margin-left: -7px;
        height: 0;
        width: 0;
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;
        border-bottom: 15px solid $m-color_20;
        left: auto;
        right: 23px;
        border-bottom-color: $m-color_20;
      }

      .user-profile-section {
        padding: 4px 20px;
        border-top-left-radius: 4px;
        border-top-right-radius: 4px;

        .media {
          img {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            border: none;
          }

          margin: 0;

          .media-body {
            align-self: center;

            h5 {
              font-size: 16px;
              font-weight: 600;
              margin-bottom: 0;
              color: $dark;
            }

            p {
              font-size: 11px;
              font-weight: 700;
              margin-bottom: 0;
              color: $m-color_6;
            }
          }
        }
      }

      .dropdown-item {
        padding: 0;

        &:not(:last-child) {
          border-bottom: 1px solid $m-color_3;
        }

        a {
          display: block; padding: 12px 16px 12px;
        }

        svg {
          vertical-align: middle;
          color: $m-color_6;
          width: 21px;
          height: 21px;
          width: 45px;
          height: 24px;
          color: $primary;
          color: $m-color_6;
          margin-right: 0;
          fill: rgba(27, 85, 226, 0.17);
          fill: rgba(0, 23, 55, 0.08);
        }

        span {
          padding-left: 0;
          position: relative;
          color: $m-color_6;
          font-size: 13px;
          font-weight: 700;
        }

        &:hover {
          svg, span {
            color: $primary;
          }
        }
      }

      .dropdown-divider {
        border-top: 1px solid $m-color_2;
      }
    }
  }
}

/*  Nav Control Sidebar Toggle     */

.navbar-expand-sm .navbar-item .cs-toggle .nav-link {
  font-size: 21px;
  margin-right: 3px;

  span.d-lg-inline-block {
    color: $primary;
  }
}

.navbar .navbar-item .nav-item.cs-toggle .nav-link span {
  color: $m-color_6;
}